<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateEducationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('education', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('resume_id')->comment('简历id');
            $table->string('name',255)->comment('学校名称')->nullable();
            $table->string('major',20)->comment('专业')->nullable();
            $table->string('edu',12)->comment('学历')->nullable();
            $table->integer('start_date')->default(0)->comment('创建时间')->nullable();
            $table->integer('end_date')->default(0)->comment('创建时间')->nullable();
            $table->tinyInteger('status')->default(0)->comment('是否删除 1：是 0：否');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `education` comment '教育经历表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('education');
    }
}
